package com.woniuxy.food.client.foodspuclient;

import com.woniuxy.food.client.param.SearchFoodSpuByConditionParam;
import com.woniuxy.food.client.result.FoodSpuClientDto;
import common.WoniuPage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import result.Result;

import java.util.List;

@FeignClient(contextId = "foodSpuQueryClient",name = "food")
public interface FoodSpuQueryClient {
    @GetMapping("/searchFoodSpuByCondition")
    public Result<WoniuPage<FoodSpuClientDto>> searchFoodSpuByCondition(@SpringQueryMap SearchFoodSpuByConditionParam param);

    @GetMapping("/searchFoodSpuBySkuId")
    public Result<FoodSpuClientDto> searchFoodSpuBySkuId(@RequestParam("skuId") Integer skuId);

    @GetMapping("/getSpuByStoreId")
    public Result<List<FoodSpuClientDto>> getSpuByStoreId(@RequestParam("storeId") Integer storeId);
}
